<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div>
    <div id="code"></div>
    <div id="message"></div>
  </div>
  <script type="text/javascript">
    var url = window.location.href;
    document.getElementById('code').innerHTML = getQueryString(url).code;
    document.getElementById('message').innerHTML = decodeURIComponent(getQueryString(url).message);
    function getQueryString(link) {
      var obj = {};
      var url = link.substr(link.indexOf("?"));
      if (url.indexOf("?") != -1) {
          var str = url.substr(1);
          var strs = str.split("&");
          for (var i = 0; i < strs.length; i++) {
              obj[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
          }
          return obj;
      }
    };
  </script>
</body>
</html>
